﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ShuaiFunctions : MonoBehaviour
{
    public static RaycastHit2D[] RaycastAll(Vector2 pos, Vector2 offset, Vector2 rayDirection, float length, LayerMask layer, Color color)
    {
        RaycastHit2D[] hits = Physics2D.RaycastAll(pos + offset, rayDirection, length, layer);
        Debug.DrawRay(pos + offset, rayDirection * length, color);

        return hits;
    }
}
